
#ifndef _RANDOM_H_
#define _RANDOM_H_


/************************************************************************************************************
**                                                      Includes                                           **
 ***********************************************************************************************************/
#include "typedef.h"

/************************************************************************************************************
**                                           Global Function Definitions                                   **
 ***********************************************************************************************************/


/************************************************************************************************************
 *  Cry_SM2_GenRandom()
 ***********************************************************************************************************/
/*!
 * \brief         Generates a sequence of random bytes for cryptographic use.
 * \details       This function initializes a random number generator with a seed and produces 
 *                a sequence of random bytes to fill the given buffer.
 *
 * \param[out]    data        Pointer to the buffer where random bytes will be stored.
 * \param[in]     len         Length of the buffer in bytes.
 *
 * \return        E_OK        Random number generation completed successfully.
 * \return        E_NOT_OK    Random number generation failed (e.g., NULL pointer or zero length).
 *
 * \pre           The calling environment must ensure \p data is valid and has sufficient memory 
 *                to store \p len bytes.
 * \context       ANY
 * \reentrant     FALSE
 * \synchronous   TRUE
 * \config        The function uses Os_CCB->counterCurVal for seeding.
 **********************************************************************************************************/
Std_ReturnType Cry_SM2_GenRandom(uint8 *data, uint32 len);


void Cry_SM2RandomGenInit(void);
#endif
